-content_for :widget_title do
  Programs
  %span
    =@programs.count

-content_for :widget_help, 'directives_list'

-content_for :widget_id, 'directives_list_widget'

%ul.tree-structure.simple
  -@programs.select {|p|p.company_controls?}.each do |program|
    %li
      %a{ :href => flow_program_path(program), :class => "block-element", :data => { :'original-title' => 'Program Information', :'content' => render(:template => 'programs/tooltip', :locals => { :program => program }), :placement => 'right', :'popover-trigger' => 'sticky-hover'} }
        .row-fluid
          .span12
            %strong.oneline
              .grcobject.governance
                %i.grcicon-control
              =program.title

  -@programs.reject {|p|p.company_controls?}.each do |program|
    %li
      -stats = program_stats(program)
      %a{ :href => flow_program_path(program), :class => "block-element", :data => { :'original-title' => 'Program Information', :'content' => render(:template => 'programs/tooltip', :locals => { :program => program }), :placement => 'right', :'popover-trigger' => 'sticky-hover'} }
        .row-fluid
          .span10
            %strong.oneline
              .grcobject.governance
                %i.grcicon-regulation
              =program.title
          -if stats[:sections_count] > 0
            .span1.inline-info
              %i.grcicon-section-color
              =stats[:sections_count]
          -else
            .span1.inline-info.blank
              %i.grcicon-section-color
              0
          -if stats[:controls_count] > 0
            .span1.inline-info
              %i.grcicon-control-color
              =stats[:controls_count]
          -else
            .span1.inline-info.blank
              %i.grcicon-control-color
              0

